public class Test {
    public static void main(String[] args) {
        System.out.println(5/2);//2
        //int\int 结果还是int 并且回乡下取整
        //若想取得数学中的结果
        int a = 5;
        int b = 2;
        double d = a*1.0/b;
        System.out.println(d);//2.5
        System.out.println((float)5/2);//2.5
        System.out.println(5/(float)2);//2.5
        System.out.println((float) (5/2));//2.0
        System.out.println((float) 5/2);//2.5
        System.out.println(10%3);//1
        System.out.println(10%-3);//1
        System.out.println(-10%3);//-1
        System.out.println(-10%-3);//-1
        System.out.println(12.5%2);//0.5
        System.out.println(1+0.2);//1.2 左为int 右为double 被提升为double

    }
}
